// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers.  See the top-level LICENSE file for dates and other
// details.  No copyright assignment is required to contribute to VisIt.

#include <PyLineSamplerAttributes.h>
#include <ObserverToCallback.h>
#include <stdio.h>
#include <Py2and3Support.h>

// ****************************************************************************
// Module: PyLineSamplerAttributes
//
// Purpose:
//   This class contains attributes for the line sampler operator.
//
// Note:       Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation:   omitted
//
// ****************************************************************************

//
// This struct contains the Python type information and a LineSamplerAttributes.
//
struct LineSamplerAttributesObject
{
    PyObject_HEAD
    LineSamplerAttributes *data;
    bool        owns;
    PyObject   *parent;
};

//
// Internal prototypes
//
static PyObject *NewLineSamplerAttributes(int);
std::string
PyLineSamplerAttributes_ToString(const LineSamplerAttributes *atts, const char *prefix, const bool forLogging)
{
    std::string str;
    char tmpStr[1000];

    const char *meshGeometry_names = "Cartesian, Cylindrical, Toroidal";
    switch (atts->GetMeshGeometry())
    {
      case LineSamplerAttributes::Cartesian:
          snprintf(tmpStr, 1000, "%smeshGeometry = %sCartesian  # %s\n", prefix, prefix, meshGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Cylindrical:
          snprintf(tmpStr, 1000, "%smeshGeometry = %sCylindrical  # %s\n", prefix, prefix, meshGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Toroidal:
          snprintf(tmpStr, 1000, "%smeshGeometry = %sToroidal  # %s\n", prefix, prefix, meshGeometry_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *arrayConfiguration_names = "Geometry, Manual";
    switch (atts->GetArrayConfiguration())
    {
      case LineSamplerAttributes::Geometry:
          snprintf(tmpStr, 1000, "%sarrayConfiguration = %sGeometry  # %s\n", prefix, prefix, arrayConfiguration_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Manual:
          snprintf(tmpStr, 1000, "%sarrayConfiguration = %sManual  # %s\n", prefix, prefix, arrayConfiguration_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *boundary_names = "Data, Wall";
    switch (atts->GetBoundary())
    {
      case LineSamplerAttributes::Data:
          snprintf(tmpStr, 1000, "%sboundary = %sData  # %s\n", prefix, prefix, boundary_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Wall:
          snprintf(tmpStr, 1000, "%sboundary = %sWall  # %s\n", prefix, prefix, boundary_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%sinstanceId = %d\n", prefix, atts->GetInstanceId());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%snArrays = %d\n", prefix, atts->GetNArrays());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%storoidalArrayAngle = %g\n", prefix, atts->GetToroidalArrayAngle());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%snChannels = %d\n", prefix, atts->GetNChannels());
    str += tmpStr;
    const char *channelProjection_names = "Divergent, Parallel, Grid";
    switch (atts->GetChannelProjection())
    {
      case LineSamplerAttributes::Divergent:
          snprintf(tmpStr, 1000, "%schannelProjection = %sDivergent  # %s\n", prefix, prefix, channelProjection_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Parallel:
          snprintf(tmpStr, 1000, "%schannelProjection = %sParallel  # %s\n", prefix, prefix, channelProjection_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Grid:
          snprintf(tmpStr, 1000, "%schannelProjection = %sGrid  # %s\n", prefix, prefix, channelProjection_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *channelLayoutType_names = "ChannelAbsolute, ChannelRelative";
    switch (atts->GetChannelLayoutType())
    {
      case LineSamplerAttributes::ChannelAbsolute:
          snprintf(tmpStr, 1000, "%schannelLayoutType = %sChannelAbsolute  # %s\n", prefix, prefix, channelLayoutType_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::ChannelRelative:
          snprintf(tmpStr, 1000, "%schannelLayoutType = %sChannelRelative  # %s\n", prefix, prefix, channelLayoutType_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%schannelOffset = %g\n", prefix, atts->GetChannelOffset());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%schannelAngle = %g\n", prefix, atts->GetChannelAngle());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%snRows = %d\n", prefix, atts->GetNRows());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%srowOffset = %g\n", prefix, atts->GetRowOffset());
    str += tmpStr;
    {   const double *arrayOrigin = atts->GetArrayOrigin();
        snprintf(tmpStr, 1000, "%sarrayOrigin = (", prefix);
        str += tmpStr;
        for(int i = 0; i < 3; ++i)
        {
            snprintf(tmpStr, 1000, "%g", arrayOrigin[i]);
            str += tmpStr;
            if(i < 2)
            {
                snprintf(tmpStr, 1000, ", ");
                str += tmpStr;
            }
        }
        snprintf(tmpStr, 1000, ")\n");
        str += tmpStr;
    }
    const char *arrayAxis_names = "R, Z";
    switch (atts->GetArrayAxis())
    {
      case LineSamplerAttributes::R:
          snprintf(tmpStr, 1000, "%sarrayAxis = %sR  # %s\n", prefix, prefix, arrayAxis_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Z:
          snprintf(tmpStr, 1000, "%sarrayAxis = %sZ  # %s\n", prefix, prefix, arrayAxis_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%spoloidalAngleStart = %g\n", prefix, atts->GetPoloidalAngleStart());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%spoloidalAngleStop = %g\n", prefix, atts->GetPoloidalAngleStop());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%spoloialAngle = %g\n", prefix, atts->GetPoloialAngle());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%spoloialRTilt = %g\n", prefix, atts->GetPoloialRTilt());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%spoloialZTilt = %g\n", prefix, atts->GetPoloialZTilt());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%storoidalAngle = %g\n", prefix, atts->GetToroidalAngle());
    str += tmpStr;
    if(atts->GetFlipToroidalAngle())
        snprintf(tmpStr, 1000, "%sflipToroidalAngle = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sflipToroidalAngle = 0\n", prefix);
    str += tmpStr;
    const char *viewGeometry_names = "Points, Lines, Surfaces";
    switch (atts->GetViewGeometry())
    {
      case LineSamplerAttributes::Points:
          snprintf(tmpStr, 1000, "%sviewGeometry = %sPoints  # %s\n", prefix, prefix, viewGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Lines:
          snprintf(tmpStr, 1000, "%sviewGeometry = %sLines  # %s\n", prefix, prefix, viewGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Surfaces:
          snprintf(tmpStr, 1000, "%sviewGeometry = %sSurfaces  # %s\n", prefix, prefix, viewGeometry_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *viewDimension_names = "One, Two, Three";
    switch (atts->GetViewDimension())
    {
      case LineSamplerAttributes::One:
          snprintf(tmpStr, 1000, "%sviewDimension = %sOne  # %s\n", prefix, prefix, viewDimension_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Two:
          snprintf(tmpStr, 1000, "%sviewDimension = %sTwo  # %s\n", prefix, prefix, viewDimension_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Three:
          snprintf(tmpStr, 1000, "%sviewDimension = %sThree  # %s\n", prefix, prefix, viewDimension_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    if(atts->GetDonotApplyToAll())
        snprintf(tmpStr, 1000, "%sdonotApplyToAll = 1\n", prefix);
    else
        snprintf(tmpStr, 1000, "%sdonotApplyToAll = 0\n", prefix);
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sheightPlotScale = %g\n", prefix, atts->GetHeightPlotScale());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%schannelPlotOffset = %g\n", prefix, atts->GetChannelPlotOffset());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sarrayPlotOffset = %g\n", prefix, atts->GetArrayPlotOffset());
    str += tmpStr;
    const char *displayTime_names = "Step, Time, Cycle";
    switch (atts->GetDisplayTime())
    {
      case LineSamplerAttributes::Step:
          snprintf(tmpStr, 1000, "%sdisplayTime = %sStep  # %s\n", prefix, prefix, displayTime_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Time:
          snprintf(tmpStr, 1000, "%sdisplayTime = %sTime  # %s\n", prefix, prefix, displayTime_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Cycle:
          snprintf(tmpStr, 1000, "%sdisplayTime = %sCycle  # %s\n", prefix, prefix, displayTime_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *channelGeometry_names = "Point, Line, Cylinder, Cone";
    switch (atts->GetChannelGeometry())
    {
      case LineSamplerAttributes::Point:
          snprintf(tmpStr, 1000, "%schannelGeometry = %sPoint  # %s\n", prefix, prefix, channelGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Line:
          snprintf(tmpStr, 1000, "%schannelGeometry = %sLine  # %s\n", prefix, prefix, channelGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Cylinder:
          snprintf(tmpStr, 1000, "%schannelGeometry = %sCylinder  # %s\n", prefix, prefix, channelGeometry_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Cone:
          snprintf(tmpStr, 1000, "%schannelGeometry = %sCone  # %s\n", prefix, prefix, channelGeometry_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%sradius = %g\n", prefix, atts->GetRadius());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%sdivergence = %g\n", prefix, atts->GetDivergence());
    str += tmpStr;
    const char *channelProfile_names = "TopHat, Gaussian";
    switch (atts->GetChannelProfile())
    {
      case LineSamplerAttributes::TopHat:
          snprintf(tmpStr, 1000, "%schannelProfile = %sTopHat  # %s\n", prefix, prefix, channelProfile_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::Gaussian:
          snprintf(tmpStr, 1000, "%schannelProfile = %sGaussian  # %s\n", prefix, prefix, channelProfile_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%sstandardDeviation = %g\n", prefix, atts->GetStandardDeviation());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%ssampleDistance = %g\n", prefix, atts->GetSampleDistance());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%ssampleVolume = %g\n", prefix, atts->GetSampleVolume());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%ssampleArc = %g\n", prefix, atts->GetSampleArc());
    str += tmpStr;
    const char *channelIntegration_names = "NoChannelIntegration, IntegrateAlongChannel";
    switch (atts->GetChannelIntegration())
    {
      case LineSamplerAttributes::NoChannelIntegration:
          snprintf(tmpStr, 1000, "%schannelIntegration = %sNoChannelIntegration  # %s\n", prefix, prefix, channelIntegration_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::IntegrateAlongChannel:
          snprintf(tmpStr, 1000, "%schannelIntegration = %sIntegrateAlongChannel  # %s\n", prefix, prefix, channelIntegration_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *toroidalIntegration_names = "NoToroidalIntegration, SampleToroidally, IntegrateToroidally";
    switch (atts->GetToroidalIntegration())
    {
      case LineSamplerAttributes::NoToroidalIntegration:
          snprintf(tmpStr, 1000, "%storoidalIntegration = %sNoToroidalIntegration  # %s\n", prefix, prefix, toroidalIntegration_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::SampleToroidally:
          snprintf(tmpStr, 1000, "%storoidalIntegration = %sSampleToroidally  # %s\n", prefix, prefix, toroidalIntegration_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::IntegrateToroidally:
          snprintf(tmpStr, 1000, "%storoidalIntegration = %sIntegrateToroidally  # %s\n", prefix, prefix, toroidalIntegration_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    const char *toroidalAngleSampling_names = "ToroidalAngleAbsoluteSampling, ToroidalAngleRelativeSampling";
    switch (atts->GetToroidalAngleSampling())
    {
      case LineSamplerAttributes::ToroidalAngleAbsoluteSampling:
          snprintf(tmpStr, 1000, "%storoidalAngleSampling = %sToroidalAngleAbsoluteSampling  # %s\n", prefix, prefix, toroidalAngleSampling_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::ToroidalAngleRelativeSampling:
          snprintf(tmpStr, 1000, "%storoidalAngleSampling = %sToroidalAngleRelativeSampling  # %s\n", prefix, prefix, toroidalAngleSampling_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%storoidalAngleStart = %g\n", prefix, atts->GetToroidalAngleStart());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%storoidalAngleStop = %g\n", prefix, atts->GetToroidalAngleStop());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%storoidalAngleStride = %g\n", prefix, atts->GetToroidalAngleStride());
    str += tmpStr;
    const char *timeSampling_names = "CurrentTimeStep, MultipleTimeSteps";
    switch (atts->GetTimeSampling())
    {
      case LineSamplerAttributes::CurrentTimeStep:
          snprintf(tmpStr, 1000, "%stimeSampling = %sCurrentTimeStep  # %s\n", prefix, prefix, timeSampling_names);
          str += tmpStr;
          break;
      case LineSamplerAttributes::MultipleTimeSteps:
          snprintf(tmpStr, 1000, "%stimeSampling = %sMultipleTimeSteps  # %s\n", prefix, prefix, timeSampling_names);
          str += tmpStr;
          break;
      default:
          break;
    }

    snprintf(tmpStr, 1000, "%stimeStepStart = %d\n", prefix, atts->GetTimeStepStart());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%stimeStepStop = %d\n", prefix, atts->GetTimeStepStop());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%stimeStepStride = %d\n", prefix, atts->GetTimeStepStride());
    str += tmpStr;
    {   const doubleVector &channelList = atts->GetChannelList();
        snprintf(tmpStr, 1000, "%schannelList = (", prefix);
        str += tmpStr;
        for(size_t i = 0; i < channelList.size(); ++i)
        {
            snprintf(tmpStr, 1000, "%g", channelList[i]);
            str += tmpStr;
            if(i < channelList.size() - 1)
            {
                snprintf(tmpStr, 1000, ", ");
                str += tmpStr;
            }
        }
        snprintf(tmpStr, 1000, ")\n");
        str += tmpStr;
    }
    {   const doubleVector &wallList = atts->GetWallList();
        snprintf(tmpStr, 1000, "%swallList = (", prefix);
        str += tmpStr;
        for(size_t i = 0; i < wallList.size(); ++i)
        {
            snprintf(tmpStr, 1000, "%g", wallList[i]);
            str += tmpStr;
            if(i < wallList.size() - 1)
            {
                snprintf(tmpStr, 1000, ", ");
                str += tmpStr;
            }
        }
        snprintf(tmpStr, 1000, ")\n");
        str += tmpStr;
    }
    snprintf(tmpStr, 1000, "%snChannelListArrays = %d\n", prefix, atts->GetNChannelListArrays());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%schannelListToroidalArrayAngle = %g\n", prefix, atts->GetChannelListToroidalArrayAngle());
    str += tmpStr;
    snprintf(tmpStr, 1000, "%schannelListToroidalAngle = %g\n", prefix, atts->GetChannelListToroidalAngle());
    str += tmpStr;
    return str;
}

static PyObject *
LineSamplerAttributes_Notify(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    obj->data->Notify();
    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_SetMeshGeometry(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid meshGeometry value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Cartesian";
        ss << ", Cylindrical";
        ss << ", Toroidal";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the meshGeometry in the object.
    obj->data->SetMeshGeometry(LineSamplerAttributes::MeshGeometry(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetMeshGeometry(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetMeshGeometry()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetArrayConfiguration(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid arrayConfiguration value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Geometry";
        ss << ", Manual";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the arrayConfiguration in the object.
    obj->data->SetArrayConfiguration(LineSamplerAttributes::ArrayConfiguration(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetArrayConfiguration(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetArrayConfiguration()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetBoundary(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid boundary value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Data";
        ss << ", Wall";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the boundary in the object.
    obj->data->SetBoundary(LineSamplerAttributes::Boundary(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetBoundary(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetBoundary()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetInstanceId(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the instanceId in the object.
    obj->data->SetInstanceId(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetInstanceId(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetInstanceId()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetNArrays(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the nArrays in the object.
    obj->data->SetNArrays(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetNArrays(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetNArrays()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalArrayAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalArrayAngle in the object.
    obj->data->SetToroidalArrayAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalArrayAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetToroidalArrayAngle());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetNChannels(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the nChannels in the object.
    obj->data->SetNChannels(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetNChannels(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetNChannels()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelProjection(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid channelProjection value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Divergent";
        ss << ", Parallel";
        ss << ", Grid";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the channelProjection in the object.
    obj->data->SetChannelProjection(LineSamplerAttributes::ChannelProjection(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelProjection(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetChannelProjection()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelLayoutType(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid channelLayoutType value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " ChannelAbsolute";
        ss << ", ChannelRelative";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the channelLayoutType in the object.
    obj->data->SetChannelLayoutType(LineSamplerAttributes::ChannelLayoutType(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelLayoutType(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetChannelLayoutType()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the channelOffset in the object.
    obj->data->SetChannelOffset(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetChannelOffset());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the channelAngle in the object.
    obj->data->SetChannelAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetChannelAngle());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetNRows(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the nRows in the object.
    obj->data->SetNRows(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetNRows(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetNRows()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetRowOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the rowOffset in the object.
    obj->data->SetRowOffset(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetRowOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetRowOffset());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetArrayOrigin(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;
    double *vals = obj->data->GetArrayOrigin();

    if (!PySequence_Check(args) || PyUnicode_Check(args))
        return PyErr_Format(PyExc_TypeError, "Expecting a sequence of numeric args");

    // break open args seq. if we think it matches this API's needs
    if (PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PySequence_Check(packaged_args) && !PyUnicode_Check(packaged_args) &&
            PySequence_Size(packaged_args) == 3)
            args = packaged_args;
    }

    if (PySequence_Size(args) != 3)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "Expecting 3 numeric args");
    }

    for (Py_ssize_t i = 0; i < PySequence_Size(args); i++)
    {
        PyObject *item = PySequence_GetItem(args, i);

        if (!PyNumber_Check(item))
        {
            Py_DECREF(item);
            Py_XDECREF(packaged_args);
            return PyErr_Format(PyExc_TypeError, "arg %d is not a number type", (int) i);
        }

        double val = PyFloat_AsDouble(item);
        double cval = double(val);

        if (val == -1 && PyErr_Occurred())
        {
            Py_XDECREF(packaged_args);
            Py_DECREF(item);
            PyErr_Clear();
            return PyErr_Format(PyExc_TypeError, "arg %d not interpretable as C++ double", (int) i);
        }
        if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
        {
            Py_XDECREF(packaged_args);
            Py_DECREF(item);
            return PyErr_Format(PyExc_ValueError, "arg %d not interpretable as C++ double", (int) i);
        }
        Py_DECREF(item);

        vals[i] = cval;
    }

    Py_XDECREF(packaged_args);

    // Mark the arrayOrigin in the object as modified.
    obj->data->SelectArrayOrigin();

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetArrayOrigin(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    // Allocate a tuple the with enough entries to hold the arrayOrigin.
    PyObject *retval = PyTuple_New(3);
    const double *arrayOrigin = obj->data->GetArrayOrigin();
    for(int i = 0; i < 3; ++i)
        PyTuple_SET_ITEM(retval, i, PyFloat_FromDouble(arrayOrigin[i]));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetArrayAxis(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid arrayAxis value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " R";
        ss << ", Z";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the arrayAxis in the object.
    obj->data->SetArrayAxis(LineSamplerAttributes::ArrayAxis(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetArrayAxis(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetArrayAxis()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetPoloidalAngleStart(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the poloidalAngleStart in the object.
    obj->data->SetPoloidalAngleStart(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetPoloidalAngleStart(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetPoloidalAngleStart());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetPoloidalAngleStop(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the poloidalAngleStop in the object.
    obj->data->SetPoloidalAngleStop(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetPoloidalAngleStop(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetPoloidalAngleStop());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetPoloialAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the poloialAngle in the object.
    obj->data->SetPoloialAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetPoloialAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetPoloialAngle());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetPoloialRTilt(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the poloialRTilt in the object.
    obj->data->SetPoloialRTilt(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetPoloialRTilt(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetPoloialRTilt());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetPoloialZTilt(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the poloialZTilt in the object.
    obj->data->SetPoloialZTilt(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetPoloialZTilt(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetPoloialZTilt());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalAngle in the object.
    obj->data->SetToroidalAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetToroidalAngle());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetFlipToroidalAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the flipToroidalAngle in the object.
    obj->data->SetFlipToroidalAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetFlipToroidalAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetFlipToroidalAngle()?1L:0L);
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetViewGeometry(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid viewGeometry value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Points";
        ss << ", Lines";
        ss << ", Surfaces";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the viewGeometry in the object.
    obj->data->SetViewGeometry(LineSamplerAttributes::ViewGeometry(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetViewGeometry(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetViewGeometry()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetViewDimension(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid viewDimension value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " One";
        ss << ", Two";
        ss << ", Three";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the viewDimension in the object.
    obj->data->SetViewDimension(LineSamplerAttributes::ViewDimension(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetViewDimension(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetViewDimension()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetDonotApplyToAll(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    bool cval = bool(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ bool");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ bool");
    }

    Py_XDECREF(packaged_args);

    // Set the donotApplyToAll in the object.
    obj->data->SetDonotApplyToAll(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetDonotApplyToAll(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(obj->data->GetDonotApplyToAll()?1L:0L);
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetHeightPlotScale(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the heightPlotScale in the object.
    obj->data->SetHeightPlotScale(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetHeightPlotScale(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetHeightPlotScale());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelPlotOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the channelPlotOffset in the object.
    obj->data->SetChannelPlotOffset(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelPlotOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetChannelPlotOffset());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetArrayPlotOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the arrayPlotOffset in the object.
    obj->data->SetArrayPlotOffset(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetArrayPlotOffset(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetArrayPlotOffset());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetDisplayTime(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid displayTime value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Step";
        ss << ", Time";
        ss << ", Cycle";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the displayTime in the object.
    obj->data->SetDisplayTime(LineSamplerAttributes::DisplayTime(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetDisplayTime(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetDisplayTime()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelGeometry(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 4)
    {
        std::stringstream ss;
        ss << "An invalid channelGeometry value was given." << std::endl;
        ss << "Valid values are in the range [0,3]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " Point";
        ss << ", Line";
        ss << ", Cylinder";
        ss << ", Cone";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the channelGeometry in the object.
    obj->data->SetChannelGeometry(LineSamplerAttributes::ChannelGeometry(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelGeometry(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetChannelGeometry()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetRadius(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the radius in the object.
    obj->data->SetRadius(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetRadius(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetRadius());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetDivergence(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the divergence in the object.
    obj->data->SetDivergence(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetDivergence(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetDivergence());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelProfile(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid channelProfile value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " TopHat";
        ss << ", Gaussian";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the channelProfile in the object.
    obj->data->SetChannelProfile(LineSamplerAttributes::ChannelProfile(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelProfile(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetChannelProfile()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetStandardDeviation(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the standardDeviation in the object.
    obj->data->SetStandardDeviation(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetStandardDeviation(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetStandardDeviation());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetSampleDistance(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the sampleDistance in the object.
    obj->data->SetSampleDistance(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetSampleDistance(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetSampleDistance());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetSampleVolume(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the sampleVolume in the object.
    obj->data->SetSampleVolume(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetSampleVolume(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetSampleVolume());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetSampleArc(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the sampleArc in the object.
    obj->data->SetSampleArc(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetSampleArc(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetSampleArc());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelIntegration(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid channelIntegration value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " NoChannelIntegration";
        ss << ", IntegrateAlongChannel";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the channelIntegration in the object.
    obj->data->SetChannelIntegration(LineSamplerAttributes::ChannelIntegration(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelIntegration(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetChannelIntegration()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalIntegration(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 3)
    {
        std::stringstream ss;
        ss << "An invalid toroidalIntegration value was given." << std::endl;
        ss << "Valid values are in the range [0,2]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " NoToroidalIntegration";
        ss << ", SampleToroidally";
        ss << ", IntegrateToroidally";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalIntegration in the object.
    obj->data->SetToroidalIntegration(LineSamplerAttributes::ToroidalIntegration(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalIntegration(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetToroidalIntegration()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalAngleSampling(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid toroidalAngleSampling value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " ToroidalAngleAbsoluteSampling";
        ss << ", ToroidalAngleRelativeSampling";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalAngleSampling in the object.
    obj->data->SetToroidalAngleSampling(LineSamplerAttributes::ToroidalAngleSampling(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalAngleSampling(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetToroidalAngleSampling()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalAngleStart(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalAngleStart in the object.
    obj->data->SetToroidalAngleStart(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalAngleStart(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetToroidalAngleStart());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalAngleStop(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalAngleStop in the object.
    obj->data->SetToroidalAngleStop(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalAngleStop(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetToroidalAngleStop());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetToroidalAngleStride(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the toroidalAngleStride in the object.
    obj->data->SetToroidalAngleStride(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetToroidalAngleStride(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetToroidalAngleStride());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetTimeSampling(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if ((val == -1 && PyErr_Occurred()) || long(cval) != val)
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }

    if (cval < 0 || cval >= 2)
    {
        std::stringstream ss;
        ss << "An invalid timeSampling value was given." << std::endl;
        ss << "Valid values are in the range [0,1]." << std::endl;
        ss << "You can also use the following symbolic names:";
        ss << " CurrentTimeStep";
        ss << ", MultipleTimeSteps";
        return PyErr_Format(PyExc_ValueError, ss.str().c_str());
    }

    Py_XDECREF(packaged_args);

    // Set the timeSampling in the object.
    obj->data->SetTimeSampling(LineSamplerAttributes::TimeSampling(cval));

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetTimeSampling(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetTimeSampling()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetTimeStepStart(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the timeStepStart in the object.
    obj->data->SetTimeStepStart(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetTimeStepStart(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetTimeStepStart()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetTimeStepStop(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the timeStepStop in the object.
    obj->data->SetTimeStepStop(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetTimeStepStop(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetTimeStepStop()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetTimeStepStride(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the timeStepStride in the object.
    obj->data->SetTimeStepStride(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetTimeStepStride(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetTimeStepStride()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelList(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    doubleVector vec;

    if (PyNumber_Check(args))
    {
        double val = PyFloat_AsDouble(args);
        double cval = double(val);
        if (val == -1 && PyErr_Occurred())
        {
            PyErr_Clear();
            return PyErr_Format(PyExc_TypeError, "number not interpretable as C++ double");
        }
        if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
            return PyErr_Format(PyExc_ValueError, "number not interpretable as C++ double");
        vec.resize(1);
        vec[0] = cval;
    }
    else if (PySequence_Check(args) && !PyUnicode_Check(args))
    {
        vec.resize(PySequence_Size(args));
        for (Py_ssize_t i = 0; i < PySequence_Size(args); i++)
        {
            PyObject *item = PySequence_GetItem(args, i);

            if (!PyNumber_Check(item))
            {
                Py_DECREF(item);
                return PyErr_Format(PyExc_TypeError, "arg %d is not a number type", (int) i);
            }

            double val = PyFloat_AsDouble(item);
            double cval = double(val);

            if (val == -1 && PyErr_Occurred())
            {
                Py_DECREF(item);
                PyErr_Clear();
                return PyErr_Format(PyExc_TypeError, "arg %d not interpretable as C++ double", (int) i);
            }
            if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
            {
                Py_DECREF(item);
                return PyErr_Format(PyExc_ValueError, "arg %d not interpretable as C++ double", (int) i);
            }
            Py_DECREF(item);

            vec[i] = cval;
        }
    }
    else
        return PyErr_Format(PyExc_TypeError, "arg(s) must be one or more doubles");

    obj->data->GetChannelList() = vec;
    // Mark the channelList in the object as modified.
    obj->data->SelectChannelList();

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelList(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    // Allocate a tuple the with enough entries to hold the channelList.
    const doubleVector &channelList = obj->data->GetChannelList();
    PyObject *retval = PyTuple_New(channelList.size());
    for(size_t i = 0; i < channelList.size(); ++i)
        PyTuple_SET_ITEM(retval, i, PyFloat_FromDouble(channelList[i]));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetWallList(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    doubleVector vec;

    if (PyNumber_Check(args))
    {
        double val = PyFloat_AsDouble(args);
        double cval = double(val);
        if (val == -1 && PyErr_Occurred())
        {
            PyErr_Clear();
            return PyErr_Format(PyExc_TypeError, "number not interpretable as C++ double");
        }
        if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
            return PyErr_Format(PyExc_ValueError, "number not interpretable as C++ double");
        vec.resize(1);
        vec[0] = cval;
    }
    else if (PySequence_Check(args) && !PyUnicode_Check(args))
    {
        vec.resize(PySequence_Size(args));
        for (Py_ssize_t i = 0; i < PySequence_Size(args); i++)
        {
            PyObject *item = PySequence_GetItem(args, i);

            if (!PyNumber_Check(item))
            {
                Py_DECREF(item);
                return PyErr_Format(PyExc_TypeError, "arg %d is not a number type", (int) i);
            }

            double val = PyFloat_AsDouble(item);
            double cval = double(val);

            if (val == -1 && PyErr_Occurred())
            {
                Py_DECREF(item);
                PyErr_Clear();
                return PyErr_Format(PyExc_TypeError, "arg %d not interpretable as C++ double", (int) i);
            }
            if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
            {
                Py_DECREF(item);
                return PyErr_Format(PyExc_ValueError, "arg %d not interpretable as C++ double", (int) i);
            }
            Py_DECREF(item);

            vec[i] = cval;
        }
    }
    else
        return PyErr_Format(PyExc_TypeError, "arg(s) must be one or more doubles");

    obj->data->GetWallList() = vec;
    // Mark the wallList in the object as modified.
    obj->data->SelectWallList();

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetWallList(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    // Allocate a tuple the with enough entries to hold the wallList.
    const doubleVector &wallList = obj->data->GetWallList();
    PyObject *retval = PyTuple_New(wallList.size());
    for(size_t i = 0; i < wallList.size(); ++i)
        PyTuple_SET_ITEM(retval, i, PyFloat_FromDouble(wallList[i]));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetNChannelListArrays(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    long val = PyLong_AsLong(args);
    int cval = int(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ int");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(long(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ int");
    }

    Py_XDECREF(packaged_args);

    // Set the nChannelListArrays in the object.
    obj->data->SetNChannelListArrays(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetNChannelListArrays(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyInt_FromLong(long(obj->data->GetNChannelListArrays()));
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelListToroidalArrayAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the channelListToroidalArrayAngle in the object.
    obj->data->SetChannelListToroidalArrayAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelListToroidalArrayAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetChannelListToroidalArrayAngle());
    return retval;
}

/*static*/ PyObject *
LineSamplerAttributes_SetChannelListToroidalAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;

    PyObject *packaged_args = 0;

    // Handle args packaged into a tuple of size one
    // if we think the unpackaged args matches our needs
    if (PySequence_Check(args) && PySequence_Size(args) == 1)
    {
        packaged_args = PySequence_GetItem(args, 0);
        if (PyNumber_Check(packaged_args))
            args = packaged_args;
    }

    if (PySequence_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "expecting a single number arg");
    }

    if (!PyNumber_Check(args))
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_TypeError, "arg is not a number type");
    }

    double val = PyFloat_AsDouble(args);
    double cval = double(val);

    if (val == -1 && PyErr_Occurred())
    {
        Py_XDECREF(packaged_args);
        PyErr_Clear();
        return PyErr_Format(PyExc_TypeError, "arg not interpretable as C++ double");
    }
    if (fabs(double(val))>1.5E-7 && fabs((double(double(cval))-double(val))/double(val))>1.5E-7)
    {
        Py_XDECREF(packaged_args);
        return PyErr_Format(PyExc_ValueError, "arg not interpretable as C++ double");
    }

    Py_XDECREF(packaged_args);

    // Set the channelListToroidalAngle in the object.
    obj->data->SetChannelListToroidalAngle(cval);

    Py_INCREF(Py_None);
    return Py_None;
}

/*static*/ PyObject *
LineSamplerAttributes_GetChannelListToroidalAngle(PyObject *self, PyObject *args)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
    PyObject *retval = PyFloat_FromDouble(obj->data->GetChannelListToroidalAngle());
    return retval;
}



PyMethodDef PyLineSamplerAttributes_methods[LINESAMPLERATTRIBUTES_NMETH] = {
    {"Notify", LineSamplerAttributes_Notify, METH_VARARGS},
    {"SetMeshGeometry", LineSamplerAttributes_SetMeshGeometry, METH_VARARGS},
    {"GetMeshGeometry", LineSamplerAttributes_GetMeshGeometry, METH_VARARGS},
    {"SetArrayConfiguration", LineSamplerAttributes_SetArrayConfiguration, METH_VARARGS},
    {"GetArrayConfiguration", LineSamplerAttributes_GetArrayConfiguration, METH_VARARGS},
    {"SetBoundary", LineSamplerAttributes_SetBoundary, METH_VARARGS},
    {"GetBoundary", LineSamplerAttributes_GetBoundary, METH_VARARGS},
    {"SetInstanceId", LineSamplerAttributes_SetInstanceId, METH_VARARGS},
    {"GetInstanceId", LineSamplerAttributes_GetInstanceId, METH_VARARGS},
    {"SetNArrays", LineSamplerAttributes_SetNArrays, METH_VARARGS},
    {"GetNArrays", LineSamplerAttributes_GetNArrays, METH_VARARGS},
    {"SetToroidalArrayAngle", LineSamplerAttributes_SetToroidalArrayAngle, METH_VARARGS},
    {"GetToroidalArrayAngle", LineSamplerAttributes_GetToroidalArrayAngle, METH_VARARGS},
    {"SetNChannels", LineSamplerAttributes_SetNChannels, METH_VARARGS},
    {"GetNChannels", LineSamplerAttributes_GetNChannels, METH_VARARGS},
    {"SetChannelProjection", LineSamplerAttributes_SetChannelProjection, METH_VARARGS},
    {"GetChannelProjection", LineSamplerAttributes_GetChannelProjection, METH_VARARGS},
    {"SetChannelLayoutType", LineSamplerAttributes_SetChannelLayoutType, METH_VARARGS},
    {"GetChannelLayoutType", LineSamplerAttributes_GetChannelLayoutType, METH_VARARGS},
    {"SetChannelOffset", LineSamplerAttributes_SetChannelOffset, METH_VARARGS},
    {"GetChannelOffset", LineSamplerAttributes_GetChannelOffset, METH_VARARGS},
    {"SetChannelAngle", LineSamplerAttributes_SetChannelAngle, METH_VARARGS},
    {"GetChannelAngle", LineSamplerAttributes_GetChannelAngle, METH_VARARGS},
    {"SetNRows", LineSamplerAttributes_SetNRows, METH_VARARGS},
    {"GetNRows", LineSamplerAttributes_GetNRows, METH_VARARGS},
    {"SetRowOffset", LineSamplerAttributes_SetRowOffset, METH_VARARGS},
    {"GetRowOffset", LineSamplerAttributes_GetRowOffset, METH_VARARGS},
    {"SetArrayOrigin", LineSamplerAttributes_SetArrayOrigin, METH_VARARGS},
    {"GetArrayOrigin", LineSamplerAttributes_GetArrayOrigin, METH_VARARGS},
    {"SetArrayAxis", LineSamplerAttributes_SetArrayAxis, METH_VARARGS},
    {"GetArrayAxis", LineSamplerAttributes_GetArrayAxis, METH_VARARGS},
    {"SetPoloidalAngleStart", LineSamplerAttributes_SetPoloidalAngleStart, METH_VARARGS},
    {"GetPoloidalAngleStart", LineSamplerAttributes_GetPoloidalAngleStart, METH_VARARGS},
    {"SetPoloidalAngleStop", LineSamplerAttributes_SetPoloidalAngleStop, METH_VARARGS},
    {"GetPoloidalAngleStop", LineSamplerAttributes_GetPoloidalAngleStop, METH_VARARGS},
    {"SetPoloialAngle", LineSamplerAttributes_SetPoloialAngle, METH_VARARGS},
    {"GetPoloialAngle", LineSamplerAttributes_GetPoloialAngle, METH_VARARGS},
    {"SetPoloialRTilt", LineSamplerAttributes_SetPoloialRTilt, METH_VARARGS},
    {"GetPoloialRTilt", LineSamplerAttributes_GetPoloialRTilt, METH_VARARGS},
    {"SetPoloialZTilt", LineSamplerAttributes_SetPoloialZTilt, METH_VARARGS},
    {"GetPoloialZTilt", LineSamplerAttributes_GetPoloialZTilt, METH_VARARGS},
    {"SetToroidalAngle", LineSamplerAttributes_SetToroidalAngle, METH_VARARGS},
    {"GetToroidalAngle", LineSamplerAttributes_GetToroidalAngle, METH_VARARGS},
    {"SetFlipToroidalAngle", LineSamplerAttributes_SetFlipToroidalAngle, METH_VARARGS},
    {"GetFlipToroidalAngle", LineSamplerAttributes_GetFlipToroidalAngle, METH_VARARGS},
    {"SetViewGeometry", LineSamplerAttributes_SetViewGeometry, METH_VARARGS},
    {"GetViewGeometry", LineSamplerAttributes_GetViewGeometry, METH_VARARGS},
    {"SetViewDimension", LineSamplerAttributes_SetViewDimension, METH_VARARGS},
    {"GetViewDimension", LineSamplerAttributes_GetViewDimension, METH_VARARGS},
    {"SetDonotApplyToAll", LineSamplerAttributes_SetDonotApplyToAll, METH_VARARGS},
    {"GetDonotApplyToAll", LineSamplerAttributes_GetDonotApplyToAll, METH_VARARGS},
    {"SetHeightPlotScale", LineSamplerAttributes_SetHeightPlotScale, METH_VARARGS},
    {"GetHeightPlotScale", LineSamplerAttributes_GetHeightPlotScale, METH_VARARGS},
    {"SetChannelPlotOffset", LineSamplerAttributes_SetChannelPlotOffset, METH_VARARGS},
    {"GetChannelPlotOffset", LineSamplerAttributes_GetChannelPlotOffset, METH_VARARGS},
    {"SetArrayPlotOffset", LineSamplerAttributes_SetArrayPlotOffset, METH_VARARGS},
    {"GetArrayPlotOffset", LineSamplerAttributes_GetArrayPlotOffset, METH_VARARGS},
    {"SetDisplayTime", LineSamplerAttributes_SetDisplayTime, METH_VARARGS},
    {"GetDisplayTime", LineSamplerAttributes_GetDisplayTime, METH_VARARGS},
    {"SetChannelGeometry", LineSamplerAttributes_SetChannelGeometry, METH_VARARGS},
    {"GetChannelGeometry", LineSamplerAttributes_GetChannelGeometry, METH_VARARGS},
    {"SetRadius", LineSamplerAttributes_SetRadius, METH_VARARGS},
    {"GetRadius", LineSamplerAttributes_GetRadius, METH_VARARGS},
    {"SetDivergence", LineSamplerAttributes_SetDivergence, METH_VARARGS},
    {"GetDivergence", LineSamplerAttributes_GetDivergence, METH_VARARGS},
    {"SetChannelProfile", LineSamplerAttributes_SetChannelProfile, METH_VARARGS},
    {"GetChannelProfile", LineSamplerAttributes_GetChannelProfile, METH_VARARGS},
    {"SetStandardDeviation", LineSamplerAttributes_SetStandardDeviation, METH_VARARGS},
    {"GetStandardDeviation", LineSamplerAttributes_GetStandardDeviation, METH_VARARGS},
    {"SetSampleDistance", LineSamplerAttributes_SetSampleDistance, METH_VARARGS},
    {"GetSampleDistance", LineSamplerAttributes_GetSampleDistance, METH_VARARGS},
    {"SetSampleVolume", LineSamplerAttributes_SetSampleVolume, METH_VARARGS},
    {"GetSampleVolume", LineSamplerAttributes_GetSampleVolume, METH_VARARGS},
    {"SetSampleArc", LineSamplerAttributes_SetSampleArc, METH_VARARGS},
    {"GetSampleArc", LineSamplerAttributes_GetSampleArc, METH_VARARGS},
    {"SetChannelIntegration", LineSamplerAttributes_SetChannelIntegration, METH_VARARGS},
    {"GetChannelIntegration", LineSamplerAttributes_GetChannelIntegration, METH_VARARGS},
    {"SetToroidalIntegration", LineSamplerAttributes_SetToroidalIntegration, METH_VARARGS},
    {"GetToroidalIntegration", LineSamplerAttributes_GetToroidalIntegration, METH_VARARGS},
    {"SetToroidalAngleSampling", LineSamplerAttributes_SetToroidalAngleSampling, METH_VARARGS},
    {"GetToroidalAngleSampling", LineSamplerAttributes_GetToroidalAngleSampling, METH_VARARGS},
    {"SetToroidalAngleStart", LineSamplerAttributes_SetToroidalAngleStart, METH_VARARGS},
    {"GetToroidalAngleStart", LineSamplerAttributes_GetToroidalAngleStart, METH_VARARGS},
    {"SetToroidalAngleStop", LineSamplerAttributes_SetToroidalAngleStop, METH_VARARGS},
    {"GetToroidalAngleStop", LineSamplerAttributes_GetToroidalAngleStop, METH_VARARGS},
    {"SetToroidalAngleStride", LineSamplerAttributes_SetToroidalAngleStride, METH_VARARGS},
    {"GetToroidalAngleStride", LineSamplerAttributes_GetToroidalAngleStride, METH_VARARGS},
    {"SetTimeSampling", LineSamplerAttributes_SetTimeSampling, METH_VARARGS},
    {"GetTimeSampling", LineSamplerAttributes_GetTimeSampling, METH_VARARGS},
    {"SetTimeStepStart", LineSamplerAttributes_SetTimeStepStart, METH_VARARGS},
    {"GetTimeStepStart", LineSamplerAttributes_GetTimeStepStart, METH_VARARGS},
    {"SetTimeStepStop", LineSamplerAttributes_SetTimeStepStop, METH_VARARGS},
    {"GetTimeStepStop", LineSamplerAttributes_GetTimeStepStop, METH_VARARGS},
    {"SetTimeStepStride", LineSamplerAttributes_SetTimeStepStride, METH_VARARGS},
    {"GetTimeStepStride", LineSamplerAttributes_GetTimeStepStride, METH_VARARGS},
    {"SetChannelList", LineSamplerAttributes_SetChannelList, METH_VARARGS},
    {"GetChannelList", LineSamplerAttributes_GetChannelList, METH_VARARGS},
    {"SetWallList", LineSamplerAttributes_SetWallList, METH_VARARGS},
    {"GetWallList", LineSamplerAttributes_GetWallList, METH_VARARGS},
    {"SetNChannelListArrays", LineSamplerAttributes_SetNChannelListArrays, METH_VARARGS},
    {"GetNChannelListArrays", LineSamplerAttributes_GetNChannelListArrays, METH_VARARGS},
    {"SetChannelListToroidalArrayAngle", LineSamplerAttributes_SetChannelListToroidalArrayAngle, METH_VARARGS},
    {"GetChannelListToroidalArrayAngle", LineSamplerAttributes_GetChannelListToroidalArrayAngle, METH_VARARGS},
    {"SetChannelListToroidalAngle", LineSamplerAttributes_SetChannelListToroidalAngle, METH_VARARGS},
    {"GetChannelListToroidalAngle", LineSamplerAttributes_GetChannelListToroidalAngle, METH_VARARGS},
    {NULL, NULL}
};

//
// Type functions
//

static void
LineSamplerAttributes_dealloc(PyObject *v)
{
   LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)v;
   if(obj->parent != 0)
       Py_DECREF(obj->parent);
   if(obj->owns)
       delete obj->data;
}

static PyObject *LineSamplerAttributes_richcompare(PyObject *self, PyObject *other, int op);
PyObject *
PyLineSamplerAttributes_getattr(PyObject *self, char *name)
{
    if(strcmp(name, "meshGeometry") == 0)
        return LineSamplerAttributes_GetMeshGeometry(self, NULL);
    if(strcmp(name, "Cartesian") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Cartesian));
    if(strcmp(name, "Cylindrical") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Cylindrical));
    if(strcmp(name, "Toroidal") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Toroidal));

    if(strcmp(name, "arrayConfiguration") == 0)
        return LineSamplerAttributes_GetArrayConfiguration(self, NULL);
    if(strcmp(name, "Geometry") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Geometry));
    if(strcmp(name, "Manual") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Manual));

    if(strcmp(name, "boundary") == 0)
        return LineSamplerAttributes_GetBoundary(self, NULL);
    if(strcmp(name, "Data") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Data));
    if(strcmp(name, "Wall") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Wall));

    if(strcmp(name, "instanceId") == 0)
        return LineSamplerAttributes_GetInstanceId(self, NULL);
    if(strcmp(name, "nArrays") == 0)
        return LineSamplerAttributes_GetNArrays(self, NULL);
    if(strcmp(name, "toroidalArrayAngle") == 0)
        return LineSamplerAttributes_GetToroidalArrayAngle(self, NULL);
    if(strcmp(name, "nChannels") == 0)
        return LineSamplerAttributes_GetNChannels(self, NULL);
    if(strcmp(name, "channelProjection") == 0)
        return LineSamplerAttributes_GetChannelProjection(self, NULL);
    if(strcmp(name, "Divergent") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Divergent));
    if(strcmp(name, "Parallel") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Parallel));
    if(strcmp(name, "Grid") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Grid));

    if(strcmp(name, "channelLayoutType") == 0)
        return LineSamplerAttributes_GetChannelLayoutType(self, NULL);
    if(strcmp(name, "ChannelAbsolute") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::ChannelAbsolute));
    if(strcmp(name, "ChannelRelative") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::ChannelRelative));

    if(strcmp(name, "channelOffset") == 0)
        return LineSamplerAttributes_GetChannelOffset(self, NULL);
    if(strcmp(name, "channelAngle") == 0)
        return LineSamplerAttributes_GetChannelAngle(self, NULL);
    if(strcmp(name, "nRows") == 0)
        return LineSamplerAttributes_GetNRows(self, NULL);
    if(strcmp(name, "rowOffset") == 0)
        return LineSamplerAttributes_GetRowOffset(self, NULL);
    if(strcmp(name, "arrayOrigin") == 0)
        return LineSamplerAttributes_GetArrayOrigin(self, NULL);
    if(strcmp(name, "arrayAxis") == 0)
        return LineSamplerAttributes_GetArrayAxis(self, NULL);
    if(strcmp(name, "R") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::R));
    if(strcmp(name, "Z") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Z));

    if(strcmp(name, "poloidalAngleStart") == 0)
        return LineSamplerAttributes_GetPoloidalAngleStart(self, NULL);
    if(strcmp(name, "poloidalAngleStop") == 0)
        return LineSamplerAttributes_GetPoloidalAngleStop(self, NULL);
    if(strcmp(name, "poloialAngle") == 0)
        return LineSamplerAttributes_GetPoloialAngle(self, NULL);
    if(strcmp(name, "poloialRTilt") == 0)
        return LineSamplerAttributes_GetPoloialRTilt(self, NULL);
    if(strcmp(name, "poloialZTilt") == 0)
        return LineSamplerAttributes_GetPoloialZTilt(self, NULL);
    if(strcmp(name, "toroidalAngle") == 0)
        return LineSamplerAttributes_GetToroidalAngle(self, NULL);
    if(strcmp(name, "flipToroidalAngle") == 0)
        return LineSamplerAttributes_GetFlipToroidalAngle(self, NULL);
    if(strcmp(name, "viewGeometry") == 0)
        return LineSamplerAttributes_GetViewGeometry(self, NULL);
    if(strcmp(name, "Points") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Points));
    if(strcmp(name, "Lines") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Lines));
    if(strcmp(name, "Surfaces") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Surfaces));

    if(strcmp(name, "viewDimension") == 0)
        return LineSamplerAttributes_GetViewDimension(self, NULL);
    if(strcmp(name, "One") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::One));
    if(strcmp(name, "Two") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Two));
    if(strcmp(name, "Three") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Three));

    if(strcmp(name, "donotApplyToAll") == 0)
        return LineSamplerAttributes_GetDonotApplyToAll(self, NULL);
    if(strcmp(name, "heightPlotScale") == 0)
        return LineSamplerAttributes_GetHeightPlotScale(self, NULL);
    if(strcmp(name, "channelPlotOffset") == 0)
        return LineSamplerAttributes_GetChannelPlotOffset(self, NULL);
    if(strcmp(name, "arrayPlotOffset") == 0)
        return LineSamplerAttributes_GetArrayPlotOffset(self, NULL);
    if(strcmp(name, "displayTime") == 0)
        return LineSamplerAttributes_GetDisplayTime(self, NULL);
    if(strcmp(name, "Step") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Step));
    if(strcmp(name, "Time") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Time));
    if(strcmp(name, "Cycle") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Cycle));

    if(strcmp(name, "channelGeometry") == 0)
        return LineSamplerAttributes_GetChannelGeometry(self, NULL);
    if(strcmp(name, "Point") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Point));
    if(strcmp(name, "Line") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Line));
    if(strcmp(name, "Cylinder") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Cylinder));
    if(strcmp(name, "Cone") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Cone));

    if(strcmp(name, "radius") == 0)
        return LineSamplerAttributes_GetRadius(self, NULL);
    if(strcmp(name, "divergence") == 0)
        return LineSamplerAttributes_GetDivergence(self, NULL);
    if(strcmp(name, "channelProfile") == 0)
        return LineSamplerAttributes_GetChannelProfile(self, NULL);
    if(strcmp(name, "TopHat") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::TopHat));
    if(strcmp(name, "Gaussian") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::Gaussian));

    if(strcmp(name, "standardDeviation") == 0)
        return LineSamplerAttributes_GetStandardDeviation(self, NULL);
    if(strcmp(name, "sampleDistance") == 0)
        return LineSamplerAttributes_GetSampleDistance(self, NULL);
    if(strcmp(name, "sampleVolume") == 0)
        return LineSamplerAttributes_GetSampleVolume(self, NULL);
    if(strcmp(name, "sampleArc") == 0)
        return LineSamplerAttributes_GetSampleArc(self, NULL);
    if(strcmp(name, "channelIntegration") == 0)
        return LineSamplerAttributes_GetChannelIntegration(self, NULL);
    if(strcmp(name, "NoChannelIntegration") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::NoChannelIntegration));
    if(strcmp(name, "IntegrateAlongChannel") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::IntegrateAlongChannel));

    if(strcmp(name, "toroidalIntegration") == 0)
        return LineSamplerAttributes_GetToroidalIntegration(self, NULL);
    if(strcmp(name, "NoToroidalIntegration") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::NoToroidalIntegration));
    if(strcmp(name, "SampleToroidally") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::SampleToroidally));
    if(strcmp(name, "IntegrateToroidally") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::IntegrateToroidally));

    if(strcmp(name, "toroidalAngleSampling") == 0)
        return LineSamplerAttributes_GetToroidalAngleSampling(self, NULL);
    if(strcmp(name, "ToroidalAngleAbsoluteSampling") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::ToroidalAngleAbsoluteSampling));
    if(strcmp(name, "ToroidalAngleRelativeSampling") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::ToroidalAngleRelativeSampling));

    if(strcmp(name, "toroidalAngleStart") == 0)
        return LineSamplerAttributes_GetToroidalAngleStart(self, NULL);
    if(strcmp(name, "toroidalAngleStop") == 0)
        return LineSamplerAttributes_GetToroidalAngleStop(self, NULL);
    if(strcmp(name, "toroidalAngleStride") == 0)
        return LineSamplerAttributes_GetToroidalAngleStride(self, NULL);
    if(strcmp(name, "timeSampling") == 0)
        return LineSamplerAttributes_GetTimeSampling(self, NULL);
    if(strcmp(name, "CurrentTimeStep") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::CurrentTimeStep));
    if(strcmp(name, "MultipleTimeSteps") == 0)
        return PyInt_FromLong(long(LineSamplerAttributes::MultipleTimeSteps));

    if(strcmp(name, "timeStepStart") == 0)
        return LineSamplerAttributes_GetTimeStepStart(self, NULL);
    if(strcmp(name, "timeStepStop") == 0)
        return LineSamplerAttributes_GetTimeStepStop(self, NULL);
    if(strcmp(name, "timeStepStride") == 0)
        return LineSamplerAttributes_GetTimeStepStride(self, NULL);
    if(strcmp(name, "channelList") == 0)
        return LineSamplerAttributes_GetChannelList(self, NULL);
    if(strcmp(name, "wallList") == 0)
        return LineSamplerAttributes_GetWallList(self, NULL);
    if(strcmp(name, "nChannelListArrays") == 0)
        return LineSamplerAttributes_GetNChannelListArrays(self, NULL);
    if(strcmp(name, "channelListToroidalArrayAngle") == 0)
        return LineSamplerAttributes_GetChannelListToroidalArrayAngle(self, NULL);
    if(strcmp(name, "channelListToroidalAngle") == 0)
        return LineSamplerAttributes_GetChannelListToroidalAngle(self, NULL);


    // Add a __dict__ answer so that dir() works
    if (!strcmp(name, "__dict__"))
    {
        PyObject *result = PyDict_New();
        for (int i = 0; PyLineSamplerAttributes_methods[i].ml_meth; i++)
            PyDict_SetItem(result,
                PyString_FromString(PyLineSamplerAttributes_methods[i].ml_name),
                PyString_FromString(PyLineSamplerAttributes_methods[i].ml_name));
        return result;
    }

    return Py_FindMethod(PyLineSamplerAttributes_methods, self, name);
}

int
PyLineSamplerAttributes_setattr(PyObject *self, char *name, PyObject *args)
{
    PyObject NULL_PY_OBJ;
    PyObject *obj = &NULL_PY_OBJ;

    if(strcmp(name, "meshGeometry") == 0)
        obj = LineSamplerAttributes_SetMeshGeometry(self, args);
    else if(strcmp(name, "arrayConfiguration") == 0)
        obj = LineSamplerAttributes_SetArrayConfiguration(self, args);
    else if(strcmp(name, "boundary") == 0)
        obj = LineSamplerAttributes_SetBoundary(self, args);
    else if(strcmp(name, "instanceId") == 0)
        obj = LineSamplerAttributes_SetInstanceId(self, args);
    else if(strcmp(name, "nArrays") == 0)
        obj = LineSamplerAttributes_SetNArrays(self, args);
    else if(strcmp(name, "toroidalArrayAngle") == 0)
        obj = LineSamplerAttributes_SetToroidalArrayAngle(self, args);
    else if(strcmp(name, "nChannels") == 0)
        obj = LineSamplerAttributes_SetNChannels(self, args);
    else if(strcmp(name, "channelProjection") == 0)
        obj = LineSamplerAttributes_SetChannelProjection(self, args);
    else if(strcmp(name, "channelLayoutType") == 0)
        obj = LineSamplerAttributes_SetChannelLayoutType(self, args);
    else if(strcmp(name, "channelOffset") == 0)
        obj = LineSamplerAttributes_SetChannelOffset(self, args);
    else if(strcmp(name, "channelAngle") == 0)
        obj = LineSamplerAttributes_SetChannelAngle(self, args);
    else if(strcmp(name, "nRows") == 0)
        obj = LineSamplerAttributes_SetNRows(self, args);
    else if(strcmp(name, "rowOffset") == 0)
        obj = LineSamplerAttributes_SetRowOffset(self, args);
    else if(strcmp(name, "arrayOrigin") == 0)
        obj = LineSamplerAttributes_SetArrayOrigin(self, args);
    else if(strcmp(name, "arrayAxis") == 0)
        obj = LineSamplerAttributes_SetArrayAxis(self, args);
    else if(strcmp(name, "poloidalAngleStart") == 0)
        obj = LineSamplerAttributes_SetPoloidalAngleStart(self, args);
    else if(strcmp(name, "poloidalAngleStop") == 0)
        obj = LineSamplerAttributes_SetPoloidalAngleStop(self, args);
    else if(strcmp(name, "poloialAngle") == 0)
        obj = LineSamplerAttributes_SetPoloialAngle(self, args);
    else if(strcmp(name, "poloialRTilt") == 0)
        obj = LineSamplerAttributes_SetPoloialRTilt(self, args);
    else if(strcmp(name, "poloialZTilt") == 0)
        obj = LineSamplerAttributes_SetPoloialZTilt(self, args);
    else if(strcmp(name, "toroidalAngle") == 0)
        obj = LineSamplerAttributes_SetToroidalAngle(self, args);
    else if(strcmp(name, "flipToroidalAngle") == 0)
        obj = LineSamplerAttributes_SetFlipToroidalAngle(self, args);
    else if(strcmp(name, "viewGeometry") == 0)
        obj = LineSamplerAttributes_SetViewGeometry(self, args);
    else if(strcmp(name, "viewDimension") == 0)
        obj = LineSamplerAttributes_SetViewDimension(self, args);
    else if(strcmp(name, "donotApplyToAll") == 0)
        obj = LineSamplerAttributes_SetDonotApplyToAll(self, args);
    else if(strcmp(name, "heightPlotScale") == 0)
        obj = LineSamplerAttributes_SetHeightPlotScale(self, args);
    else if(strcmp(name, "channelPlotOffset") == 0)
        obj = LineSamplerAttributes_SetChannelPlotOffset(self, args);
    else if(strcmp(name, "arrayPlotOffset") == 0)
        obj = LineSamplerAttributes_SetArrayPlotOffset(self, args);
    else if(strcmp(name, "displayTime") == 0)
        obj = LineSamplerAttributes_SetDisplayTime(self, args);
    else if(strcmp(name, "channelGeometry") == 0)
        obj = LineSamplerAttributes_SetChannelGeometry(self, args);
    else if(strcmp(name, "radius") == 0)
        obj = LineSamplerAttributes_SetRadius(self, args);
    else if(strcmp(name, "divergence") == 0)
        obj = LineSamplerAttributes_SetDivergence(self, args);
    else if(strcmp(name, "channelProfile") == 0)
        obj = LineSamplerAttributes_SetChannelProfile(self, args);
    else if(strcmp(name, "standardDeviation") == 0)
        obj = LineSamplerAttributes_SetStandardDeviation(self, args);
    else if(strcmp(name, "sampleDistance") == 0)
        obj = LineSamplerAttributes_SetSampleDistance(self, args);
    else if(strcmp(name, "sampleVolume") == 0)
        obj = LineSamplerAttributes_SetSampleVolume(self, args);
    else if(strcmp(name, "sampleArc") == 0)
        obj = LineSamplerAttributes_SetSampleArc(self, args);
    else if(strcmp(name, "channelIntegration") == 0)
        obj = LineSamplerAttributes_SetChannelIntegration(self, args);
    else if(strcmp(name, "toroidalIntegration") == 0)
        obj = LineSamplerAttributes_SetToroidalIntegration(self, args);
    else if(strcmp(name, "toroidalAngleSampling") == 0)
        obj = LineSamplerAttributes_SetToroidalAngleSampling(self, args);
    else if(strcmp(name, "toroidalAngleStart") == 0)
        obj = LineSamplerAttributes_SetToroidalAngleStart(self, args);
    else if(strcmp(name, "toroidalAngleStop") == 0)
        obj = LineSamplerAttributes_SetToroidalAngleStop(self, args);
    else if(strcmp(name, "toroidalAngleStride") == 0)
        obj = LineSamplerAttributes_SetToroidalAngleStride(self, args);
    else if(strcmp(name, "timeSampling") == 0)
        obj = LineSamplerAttributes_SetTimeSampling(self, args);
    else if(strcmp(name, "timeStepStart") == 0)
        obj = LineSamplerAttributes_SetTimeStepStart(self, args);
    else if(strcmp(name, "timeStepStop") == 0)
        obj = LineSamplerAttributes_SetTimeStepStop(self, args);
    else if(strcmp(name, "timeStepStride") == 0)
        obj = LineSamplerAttributes_SetTimeStepStride(self, args);
    else if(strcmp(name, "channelList") == 0)
        obj = LineSamplerAttributes_SetChannelList(self, args);
    else if(strcmp(name, "wallList") == 0)
        obj = LineSamplerAttributes_SetWallList(self, args);
    else if(strcmp(name, "nChannelListArrays") == 0)
        obj = LineSamplerAttributes_SetNChannelListArrays(self, args);
    else if(strcmp(name, "channelListToroidalArrayAngle") == 0)
        obj = LineSamplerAttributes_SetChannelListToroidalArrayAngle(self, args);
    else if(strcmp(name, "channelListToroidalAngle") == 0)
        obj = LineSamplerAttributes_SetChannelListToroidalAngle(self, args);

    if (obj != NULL && obj != &NULL_PY_OBJ)
        Py_DECREF(obj);

    if (obj == &NULL_PY_OBJ)
    {
        obj = NULL;
        PyErr_Format(PyExc_NameError, "name '%s' is not defined", name);
    }
    else if (obj == NULL && !PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "unknown problem with '%s'", name);

    return (obj != NULL) ? 0 : -1;
}

static int
LineSamplerAttributes_print(PyObject *v, FILE *fp, int flags)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)v;
    fprintf(fp, "%s", PyLineSamplerAttributes_ToString(obj->data, "",false).c_str());
    return 0;
}

PyObject *
LineSamplerAttributes_str(PyObject *v)
{
    LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)v;
    return PyString_FromString(PyLineSamplerAttributes_ToString(obj->data,"", false).c_str());
}

//
// The doc string for the class.
//
#if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5)
static const char *LineSamplerAttributes_Purpose = "This class contains attributes for the line sampler operator.";
#else
static char *LineSamplerAttributes_Purpose = "This class contains attributes for the line sampler operator.";
#endif

//
// Python Type Struct Def Macro from Py2and3Support.h
//
//         VISIT_PY_TYPE_OBJ( VPY_TYPE,
//                            VPY_NAME,
//                            VPY_OBJECT,
//                            VPY_DEALLOC,
//                            VPY_PRINT,
//                            VPY_GETATTR,
//                            VPY_SETATTR,
//                            VPY_STR,
//                            VPY_PURPOSE,
//                            VPY_RICHCOMP,
//                            VPY_AS_NUMBER)

//
// The type description structure
//

VISIT_PY_TYPE_OBJ(LineSamplerAttributesType,         \
                  "LineSamplerAttributes",           \
                  LineSamplerAttributesObject,       \
                  LineSamplerAttributes_dealloc,     \
                  LineSamplerAttributes_print,       \
                  PyLineSamplerAttributes_getattr,   \
                  PyLineSamplerAttributes_setattr,   \
                  LineSamplerAttributes_str,         \
                  LineSamplerAttributes_Purpose,     \
                  LineSamplerAttributes_richcompare, \
                  0); /* as_number*/

//
// Helper function for comparing.
//
static PyObject *
LineSamplerAttributes_richcompare(PyObject *self, PyObject *other, int op)
{
    // only compare against the same type 
    if ( Py_TYPE(self) != &LineSamplerAttributesType
         || Py_TYPE(other) != &LineSamplerAttributesType)
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    PyObject *res = NULL;
    LineSamplerAttributes *a = ((LineSamplerAttributesObject *)self)->data;
    LineSamplerAttributes *b = ((LineSamplerAttributesObject *)other)->data;

    switch (op)
    {
       case Py_EQ:
           res = (*a == *b) ? Py_True : Py_False;
           break;
       case Py_NE:
           res = (*a != *b) ? Py_True : Py_False;
           break;
       default:
           res = Py_NotImplemented;
           break;
    }

    Py_INCREF(res);
    return res;
}

//
// Helper functions for object allocation.
//

static LineSamplerAttributes *defaultAtts = 0;
static LineSamplerAttributes *currentAtts = 0;

static PyObject *
NewLineSamplerAttributes(int useCurrent)
{
    LineSamplerAttributesObject *newObject;
    newObject = PyObject_NEW(LineSamplerAttributesObject, &LineSamplerAttributesType);
    if(newObject == NULL)
        return NULL;
    if(useCurrent && currentAtts != 0)
        newObject->data = new LineSamplerAttributes(*currentAtts);
    else if(defaultAtts != 0)
        newObject->data = new LineSamplerAttributes(*defaultAtts);
    else
        newObject->data = new LineSamplerAttributes;
    newObject->owns = true;
    newObject->parent = 0;
    return (PyObject *)newObject;
}

static PyObject *
WrapLineSamplerAttributes(const LineSamplerAttributes *attr)
{
    LineSamplerAttributesObject *newObject;
    newObject = PyObject_NEW(LineSamplerAttributesObject, &LineSamplerAttributesType);
    if(newObject == NULL)
        return NULL;
    newObject->data = (LineSamplerAttributes *)attr;
    newObject->owns = false;
    newObject->parent = 0;
    return (PyObject *)newObject;
}

///////////////////////////////////////////////////////////////////////////////
//
// Interface that is exposed to the VisIt module.
//
///////////////////////////////////////////////////////////////////////////////

PyObject *
LineSamplerAttributes_new(PyObject *self, PyObject *args)
{
    int useCurrent = 0;
    if (!PyArg_ParseTuple(args, "i", &useCurrent))
    {
        if (!PyArg_ParseTuple(args, ""))
            return NULL;
        else
            PyErr_Clear();
    }

    return (PyObject *)NewLineSamplerAttributes(useCurrent);
}

//
// Plugin method table. These methods are added to the visitmodule's methods.
//
static PyMethodDef LineSamplerAttributesMethods[] = {
    {"LineSamplerAttributes", LineSamplerAttributes_new, METH_VARARGS},
    {NULL,      NULL}        /* Sentinel */
};

static Observer *LineSamplerAttributesObserver = 0;

std::string
PyLineSamplerAttributes_GetLogString()
{
    std::string s("LineSamplerAtts = LineSamplerAttributes()\n");
    if(currentAtts != 0)
        s += PyLineSamplerAttributes_ToString(currentAtts, "LineSamplerAtts.", true);
    return s;
}

static void
PyLineSamplerAttributes_CallLogRoutine(Subject *subj, void *data)
{
    typedef void (*logCallback)(const std::string &);
    logCallback cb = (logCallback)data;

    if(cb != 0)
    {
        std::string s("LineSamplerAtts = LineSamplerAttributes()\n");
        s += PyLineSamplerAttributes_ToString(currentAtts, "LineSamplerAtts.", true);
        cb(s);
    }
}

void
PyLineSamplerAttributes_StartUp(LineSamplerAttributes *subj, void *data)
{
    if(subj == 0)
        return;

    currentAtts = subj;
    PyLineSamplerAttributes_SetDefaults(subj);

    //
    // Create the observer that will be notified when the attributes change.
    //
    if(LineSamplerAttributesObserver == 0)
    {
        LineSamplerAttributesObserver = new ObserverToCallback(subj,
            PyLineSamplerAttributes_CallLogRoutine, (void *)data);
    }

}

void
PyLineSamplerAttributes_CloseDown()
{
    delete defaultAtts;
    defaultAtts = 0;
    delete LineSamplerAttributesObserver;
    LineSamplerAttributesObserver = 0;
}

PyMethodDef *
PyLineSamplerAttributes_GetMethodTable(int *nMethods)
{
    *nMethods = 1;
    return LineSamplerAttributesMethods;
}

bool
PyLineSamplerAttributes_Check(PyObject *obj)
{
    return (obj->ob_type == &LineSamplerAttributesType);
}

LineSamplerAttributes *
PyLineSamplerAttributes_FromPyObject(PyObject *obj)
{
    LineSamplerAttributesObject *obj2 = (LineSamplerAttributesObject *)obj;
    return obj2->data;
}

PyObject *
PyLineSamplerAttributes_New()
{
    return NewLineSamplerAttributes(0);
}

PyObject *
PyLineSamplerAttributes_Wrap(const LineSamplerAttributes *attr)
{
    return WrapLineSamplerAttributes(attr);
}

void
PyLineSamplerAttributes_SetParent(PyObject *obj, PyObject *parent)
{
    LineSamplerAttributesObject *obj2 = (LineSamplerAttributesObject *)obj;
    obj2->parent = parent;
}

void
PyLineSamplerAttributes_SetDefaults(const LineSamplerAttributes *atts)
{
    if(defaultAtts)
        delete defaultAtts;

    defaultAtts = new LineSamplerAttributes(*atts);
}

